home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / afterw < prev    next >
Text File  |  2001-03-21  |  1KB  |  30 lines

  1. Synopsis:
  2.    $afterw(<word> <text>)
  3.    $beforew(<word> <text>)
  4.  
  5. Technical:
  6.    These functions return their input string, minus all words up to the
  7.    given word ($beforew()) or following the given word ($afterw()).  They
  8.    are analogous to $after() and $before(), operating on whole words
  9.    instead of characters.  They search only for the first occurrence of the
  10.    given word.
  11.  
  12. Practical:
  13.    These return the part of the input text that is before or after the
  14.    first instance of the given word.  This is probably most useful for
  15.    internal parsing inside scripts; a variable might hold certain
  16.    parameters, of which only certain ones might be useful at a particular
  17.    time.  If the given word does not appear in the input text, nothing
  18.    is returned.
  19.  
  20. Returns:
  21.    afterw:  input list after first instance of given word
  22.    beforew: input list before first instance of given word
  23.  
  24. Examples:
  25.    $afterw(foobar one two foobar my shoe)    returns "my shoe"
  26.    $afterw(booya one two foobar my shoe)     returns ""  (empty string)
  27.    $beforew(foobar one two foobar my shoe)   returns "one two"
  28.    $beforew(booya one two foobar my shoe)    returns ""  (empty string)
  29.  
  30.